﻿@using giaoxuhaison.Models;
@using giaoxuhaison.Common;
@{
    ViewBag.Title = "DownloadDocument";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@{
    var lstItem = (List<vw_DocumentsAll>)ViewData["lstDocument"];
    var lstLinkPath = (List<LinkPath>)ViewData["lstLinkPath"];
    if (lstLinkPath.Count > 0)
    {
        Common.strPath = lstLinkPath[0].LinkPath1.ToString();
    }
            
}

<style>
table,th,td
{
border:1px solid blue;
border-collapse:collapse;
}
</style>

<div class="LeftGroupNews">    
    <!--load tin moi -->
    @if (lstItem.Count > 0)
    {
        <div class="DetailNewsGrpTitle">        
            DOWNLOAD TÀI LIỆU GIÁO XỨ
        </div>        
        <div class="DetailContentNews">
            <div class="NewsGrpContent">
                <i style="color:Red;">Click vào nút download nếu muốn tải tài liệu</i>
                <table style="width:100%">
                <tr align="center" style="color: Blue;">
                  <th>Tên tài liệu</th>
                  <th>Ngày upload</th>		
                  <th>Download</th>
                  </tr>
                <tr>
                @{
                    var i = 0;
    
                    foreach (var item in lstItem)
                    {
                        i ++;
                        
                        <tr>
                          <td>@i.ToString(). @item.Subject</td>
                          <td align="center">@item.CreationDate.ToString("dd/MM/yyyy")</td>		
                          <td align="center">
                              <a href='@Url.Content(item.FileLink)' target="_blank">
                                <img align=middle src="~/Images/Banner/Download.png" alt = "" />
                              </a>
                          </td>
                        </tr>                    
                    }
                }
                </table>            
            </div>        
        </div>
    }
</div>

<div class="RightGroupNews">
    <div class="RightGroupTitle">
        @Html.Label("TIN/ BÀI MỚI", new { @class = "lblLeftTitle" })                        
    </div>
    <div class="RightGroupContent">
        <!--Hien thi phan loi Chua moi-->        
        <!--Hien thi tin tuc moi cua group-->
        @Html.Action("IndexRightNews", "News")
        @*@Html.Action("NewLiturgy", "Liturgies")*@
    </div>   

    <div class="RightGroupTitle">
        @Html.Label("SUY NIỆM LỜI CHÚA", new { @class = "lblLeftTitle" })                        
    </div>
    <div class="RightGroupContent">
        <!--Hien thi phan loi Chua moi-->        
        <!--Hien thi tin tuc moi cua group-->
        <!-- load phan thong bao moi -->
        <!--Hien thi phan loi Chua moi-->
        @Html.Action("NewGodTitle", "GodTitle")
    </div> 
       
</div>
